
import Base.FileOperation;
import com.alibaba.fastjson2.JSONObject;
import frame.Home;
import frame.Login;
import global.PublciVariable;
import global.PublicClass;


public class Main {

    public static void main(String[] args) {
        PublicClass.home = new Home();
        PublicClass.login = new Login();
        // 读取登录信息
        JSONObject user = FileOperation.readJson("src/main/resources/data/user/log");

        // 已登录
        if (user.getString("username") != null && user.getString("password") != null) {
            PublicClass.home.open();
        }
        // 未登录
        else {
            PublicClass.login.open();
        }
    }
}